package com.ymttest.database.sqlwapper;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.ymt.database.SqlManager;
import com.ymttest.database.model.YmtStockChangeDetail;
import com.ymttest.database.model.YmtSyncStockLog;

public class YmtLoggingWapper {
	SqlManager manage;

	public YmtLoggingWapper() {
		manage = new SqlManager("logging");
	}

	public Map selectLiveBehaviorById(Integer liveid, Integer userid) throws InterruptedException {
		Map m = new HashMap<>();
		m.put("liveid", liveid);
		m.put("userid", userid);
		List<Map> LiveBehaviorMap = manage.getSelectResults("com.ymttest.database.mapping.LoggingMapper.selectLiveBehaviorById", m);
		manage.commit();
		return LiveBehaviorMap.get(0);
	}

	public List<Map> selectPPAccoutingLogByBizno(String bid) throws InterruptedException {
		Map m = new HashMap<String, String>();
		m.put("bid", bid);
		List<Map> accountlog = manage.getSelectResults("com.ymttest.database.mapping.LoggingMapper.selectPPAccoutingLogByBizno", m);
		manage.commit();
		return accountlog;
	}
	public List<Map> selectRefundMiscRequestLogByRefundId(String rid) throws InterruptedException {
		Map m = new HashMap<String, String>();
		m.put("rid",rid);
		List<Map> accountlog = manage.getSelectResults("com.ymttest.database.mapping.LoggingMapper.selectRefundMiscRequestLogByRefundId", m);
		manage.commit();
		return accountlog;
	}
	
	public static void main(String[] args) throws InterruptedException {
		System.out.println(new YmtLoggingWapper().selectLiveBehaviorById(3553, 9));
	}
}
